package unittest.sample;
import org.hamcrest.*;
import org.junit.*;

import java.util.*;

/**
 * example of junit4 and hamcrest
 */
public class TestDemo {

    private List<String> list = new ArrayList<>();

    @Before
    public void setUp() {
        list.add("a");
        list.add("b");
    }

    @Test
    public void test() {
        MatcherAssert.assertThat(list, Matchers.hasItem("a"));
        System.out.println("finish test");
    }
}
